// 权限管理和菜单管理
import request from '@/utils/request'
// 获取权限管理数据
export function listRole(data) {
  return request({
    url: '/ucenter/resource/treeResource',
    params: data
  })
}
// 新增权限
export function addRole(data) {
  return request({
    url: '/ucenter/resource/insert',
    method: 'post',
    data
  })
}
// 编辑菜单
export function updateRole(data) {
  return request({
    url: '/ucenter/resource/update',
    method: 'post',
    data
  })
}
// 查询单个菜单
export function getRole(id) {
  return request({
    url: `/ucenter/query/${id}`
  })
}
// 批量删除用户
export function deleteRole(data) {
  return request({
    url: `/ucenter/resource/deleteList`,
    data,
    method: 'post'
  })
}
